unit untCadFinanceiro;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, untCadPadrao, cxStyles, cxCustomData, cxGraphics, cxFilter,
  cxData, cxDataStorage, cxEdit, DB, cxDBData, cxIntlBase, cxintl,
  cxPropertiesStore, ACBrBase, ACBrEnterTab, cxContainer, cxGridTableView,
  cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels, dxBarDBNav,
  ImgList, ActnList, dxBar, cxClasses, IBQuery, IBCustomDataSet, ExtCtrls,
  cxGridLevel, cxControls, cxGridCustomView, cxGridCustomTableView,
  cxGridDBTableView, cxGrid, cxPC, cxDropDownEdit, cxLookupEdit,
  cxDBLookupEdit, cxDBLookupComboBox, cxButtonEdit, cxDBEdit, cxLabel,
  cxTextEdit, cxMaskEdit, cxCalendar, cxCalc, StdCtrls,
  cxGridBandedTableView, cxGridDBBandedTableView, cxLookAndFeelPainters,
  dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinCaramel, dxSkinCoffee,
  dxSkinDarkRoom, dxSkinDarkSide, dxSkinFoggy, dxSkinGlassOceans,
  dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
  dxSkinMcSkin, dxSkinMoneyTwins, dxSkinOffice2007Black,
  dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
  dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
  dxSkinOffice2010Silver, dxSkinPumpkin, dxSkinSeven, dxSkinSharp,
  dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
  dxSkinsDefaultPainters, dxSkinValentine, dxSkinXmas2008Blue,
  dxSkinscxPCPainter, dxSkinsdxBarPainter, dxSkinsForm;

type
  TfrmCadFinanceiro = class(TfrmCadPadrao)
    dtListCODIGO: TIntegerField;
    dtListDATA_LANCTO: TDateField;
    dtListDATA_VENCTO: TDateField;
    dtListVALOR_NOMINAL: TIBBCDField;
    dtListVALOR_BAIXADO: TIBBCDField;
    dtListCOD_CLASSE_GERENCIAL: TIntegerField;
    dtListTIPO: TIBStringField;
    dtListN_DOCUMENTO: TIBStringField;
    dtListJURO: TIBBCDField;
    dtListMULTA: TIBBCDField;
    dtListVARIACAO: TIBBCDField;
    dtListDESCONTO: TIBBCDField;
    dtListCOD_STATUS_TITULO: TIntegerField;
    dtListCLASSE_GERENCIAL: TIBStringField;
    dtListSTATUS_TITULO: TIBStringField;
    dtListCOD_TERCEIRO: TIntegerField;
    dtListTERCEIRO: TIBStringField;
    cxDBDateEdit2: TcxDBDateEdit;
    cxLabel16: TcxLabel;
    edtCodigo: TcxDBTextEdit;
    cxLabel1: TcxLabel;
    dsTerceiro: TDataSource;
    lstTerceiro: TIBQuery;
    lstTerceiroCODIGO: TIntegerField;
    lstTerceiroNOME: TIBStringField;
    btnTerceiro: TcxButtonEdit;
    cbTerceiro: TcxDBLookupComboBox;
    cxLabel5: TcxLabel;
    cxDBDateEdit1: TcxDBDateEdit;
    cxLabel2: TcxLabel;
    dtEditCODIGO: TIntegerField;
    dtEditDATA_LANCTO: TDateField;
    dtEditDATA_VENCTO: TDateField;
    dtEditVALOR_NOMINAL: TIBBCDField;
    dtEditVALOR_BAIXADO: TIBBCDField;
    dtEditCOD_CLASSE_GERENCIAL: TIntegerField;
    dtEditCOD_TERCEIRO: TIntegerField;
    dtEditTIPO: TIBStringField;
    dtEditN_DOCUMENTO: TIBStringField;
    dtEditJURO: TIBBCDField;
    dtEditMULTA: TIBBCDField;
    dtEditVARIACAO: TIBBCDField;
    dtEditDESCONTO: TIBBCDField;
    dtEditCOD_STATUS_TITULO: TIntegerField;
    dtEditSALDO_NOMINAL: TIBBCDField;
    dtListSALDO_NOMINAL: TIBBCDField;
    GroupBox1: TGroupBox;
    cxDBCalcEdit7: TcxDBCalcEdit;
    cxLabel9: TcxLabel;
    cxDBCalcEdit4: TcxDBCalcEdit;
    cxLabel6: TcxLabel;
    cxDBCalcEdit5: TcxDBCalcEdit;
    cxLabel7: TcxLabel;
    cxDBCalcEdit6: TcxDBCalcEdit;
    cxLabel8: TcxLabel;
    cxDBCalcEdit3: TcxDBCalcEdit;
    cxLabel4: TcxLabel;
    cxDBCalcEdit2: TcxDBCalcEdit;
    cxLabel21: TcxLabel;
    cxDBCalcEdit1: TcxDBCalcEdit;
    cxLabel3: TcxLabel;
    cxDBTextEdit3: TcxDBTextEdit;
    cxLabel10: TcxLabel;
    cbClasseGerencial: TcxDBLookupComboBox;
    cxLabel11: TcxLabel;
    btnClasseGerencial: TcxButtonEdit;
    cbStatusTitulo: TcxDBLookupComboBox;
    cxLabel12: TcxLabel;
    btnStatusTitulo: TcxButtonEdit;
    dsClasseGerencial: TDataSource;
    lstClasseGerencial: TIBQuery;
    lstClasseGerencialCODIGO: TIntegerField;
    lstClasseGerencialNOME: TIBStringField;
    lstClasseGerencialTIPO: TIBStringField;
    dsStatusTitulo: TDataSource;
    lstStatusTitulo: TIBQuery;
    lstStatusTituloCODIGO: TIntegerField;
    lstStatusTituloNOME: TIBStringField;
    GridDBBandedTableView2CODIGO: TcxGridDBBandedColumn;
    GridDBBandedTableView2DATA_LANCTO: TcxGridDBBandedColumn;
    GridDBBandedTableView2DATA_VENCTO: TcxGridDBBandedColumn;
    GridDBBandedTableView2VALOR_NOMINAL: TcxGridDBBandedColumn;
    GridDBBandedTableView2VALOR_BAIXADO: TcxGridDBBandedColumn;
    GridDBBandedTableView2COD_CLASSE_GERENCIAL: TcxGridDBBandedColumn;
    GridDBBandedTableView2TIPO: TcxGridDBBandedColumn;
    GridDBBandedTableView2N_DOCUMENTO: TcxGridDBBandedColumn;
    GridDBBandedTableView2JURO: TcxGridDBBandedColumn;
    GridDBBandedTableView2MULTA: TcxGridDBBandedColumn;
    GridDBBandedTableView2VARIACAO: TcxGridDBBandedColumn;
    GridDBBandedTableView2DESCONTO: TcxGridDBBandedColumn;
    GridDBBandedTableView2COD_STATUS_TITULO: TcxGridDBBandedColumn;
    GridDBBandedTableView2CLASSE_GERENCIAL: TcxGridDBBandedColumn;
    GridDBBandedTableView2STATUS_TITULO: TcxGridDBBandedColumn;
    GridDBBandedTableView2COD_TERCEIRO: TcxGridDBBandedColumn;
    GridDBBandedTableView2TERCEIRO: TcxGridDBBandedColumn;
    GridDBBandedTableView2SALDO_NOMINAL: TcxGridDBBandedColumn;
    procedure FormShow(Sender: TObject);
    procedure ActCadLookupExecute(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmCadFinanceiro: TfrmCadFinanceiro;

implementation

{$R *.dfm}

procedure TfrmCadFinanceiro.FormShow(Sender: TObject);
begin
  inherited;
  lstTerceiro.Close;
  lstTerceiro.Open;

  lstClasseGerencial.Close;
  lstClasseGerencial.Open;

  lstClasseGerencial.Close;
  lstClasseGerencial.Open;
end;

procedure TfrmCadFinanceiro.ActCadLookupExecute(Sender: TObject);
begin
  inherited;
  if cbTerceiro.Focused then
    btnTerceiro.OnClick(btnTerceiro)
  else if cbClasseGerencial.Focused then
    btnClasseGerencial.OnClick(btnClasseGerencial)
  else if cbStatusTitulo.Focused then
    btnStatusTitulo.OnClick(btnStatusTitulo);
end;

end.
